package org.afs.gescol.component.edt.gwt.client.factory;

import java.util.Map;

import org.afs.gescol.component.edt.gwt.client.bundle.EdtComponentResources;
import org.afs.gescol.component.edt.gwt.client.i18n.AppMessages;
import org.afs.gescol.component.edt.gwt.client.presenter.EmploiDuTempsPresenter;
import org.afs.gescol.component.edt.gwt.client.presenter.EmploiDuTempsPresenter.EmploiDuTempsView;
import org.afs.gescol.component.edt.gwt.client.view.EmploiDuTempsViewImpl;
import org.afs.gescol.component.edt.gwt.client.view.EmploiDuTempsViewImpl.EmploiDuTempsViewBinder;
import org.afs.gescol.component.edt.gwt.shared.ConstantesKeysModel;
import org.scub.foundation.framework.gwt.module.shared.IdLabelModel;

import com.google.gwt.core.client.GWT;

/**
 * Application Client Factory.
 * @autor Kobla GBENYO (kobla.gbenyo@gmail.com)
 */
public final class EdtComponentClientFactory {

    private static AppMessages messages;

    private static EdtComponentResources resources;

    private static EmploiDuTempsViewBinder emploiDuTempsViewBinder;

    private static EmploiDuTempsPresenter emploiDuTempsPresenter;

    private EdtComponentClientFactory() {
    }

    /**
     * Create and get an instance of messages.
     * @return the messages
     */
    public static AppMessages getMessages() {
        if (messages == null) {
            messages = GWT.create(AppMessages.class);
        }
        return messages;
    }

    /**
     * Create and get an instance of resources.
     * @return the resources
     */
    public static EdtComponentResources getResources() {
        if (resources == null) {
            resources = GWT.create(EdtComponentResources.class);
        }
        return resources;
    }

    /**
     * Create and get an instance of EDT binder.
     * @return the resources
     */
    public static EmploiDuTempsViewBinder getEmploiDuTempsViewBinder() {
        if (emploiDuTempsViewBinder == null) {
            emploiDuTempsViewBinder = GWT.create(EmploiDuTempsViewBinder.class);
        }
        return emploiDuTempsViewBinder;
    }

    /**
     * Create a new instance of EmploiDuTempsView.
     * @return the EmploiDuTempsView
     */
    public static EmploiDuTempsView getEmploiDuTempsView() {
        return new EmploiDuTempsViewImpl();
    }

    /**
     * Create and get an instance of EDT component.
     * @return the component
     */
    public static EmploiDuTempsPresenter getEdtComponent() {
        if (emploiDuTempsPresenter == null) {
            emploiDuTempsPresenter = GWT.create(EmploiDuTempsPresenter.class);
        }
        return emploiDuTempsPresenter;
    }
}
